relevant indicator is Access to electricity (% of population)
From 1960 to 1989 and in 2021, no data was collected on access to electricity for all countries so I will remove those years from the data
#check if there is duplicate i.e a country appearing twice
print(f'number of duplicate observation is {access.duplicated().sum()}')
number of duplicate observation is 0
countries = null_counts.index
countries_with_no_record((25, 9), countries, null_counts, 'countries with their number of years of\n\
no records')
null_counts_highest = null_counts[null_counts > 10]
countries_high = null_counts_highest.index
countries_with_no_record((12, 9), countries_high, null_counts_highest, 'countries that had\
more than 10 years of no record')
countries_10 = null_counts[null_counts == 10].index.to_list()
plt.rcParams["animation.html"] = "jshtml"
animate_the_countries(countries_10, 'Countries with no records for 10 years', True, 'missing 10 years')
non_null_counts = access_country.T.isna().sum()[access_country.T.isna().sum() == 0].sort_values()
full = non_null_counts.index.to_list()
plt.rcParams["animation.html"] = "jshtml"
animate_the_countries(full, 'Countries with records for all years', False, 'no missing years')
miss = null_counts.index.to_list()
plt.rcParams["animation.html"] = "jshtml"
animate_the_countries(miss, 'Countries with at least one missing record', False, 'missing at least a year')
it seems Not classified countries and American Samoa has no record at all